<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Hello Vue.js</title>
</head>

<body>
    <div id="even-handling">
        <p>{{message}}</p>
        <button v-on:click="reverseMsg">反转按钮</button>
    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const EventHandling = {
        data() {
            return {
                message: "hello Vue.js!!!"
            }
        },
        methods: {
            reverseMsg() {
                this.message = this.message.split('').reverse().join('');
            }
        },
    }
    Vue.createApp(EventHandling).mount("#even-handling")

</script>

</html>